<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>BCodec (Apache Commons Codec 1.10 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="BCodec (Apache Commons Codec 1.10 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BCodec.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/codec/net/BCodec.html" target="_top">Frames</a></li>
<li><a href="BCodec.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.codec.net</div>
<h2 title="Class BCodec" class="title">Class BCodec</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.codec.net.BCodec</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a>, <a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a>, <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">BCodec</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a>, <a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></pre>
<div class="block">Identical to the Base64 encoding defined by <a href="http://www.ietf.org/rfc/rfc1521.txt">RFC 1521</a>
 and allows a character set to be specified.
 <p>
 <a href="http://www.ietf.org/rfc/rfc1522.txt">RFC 1522</a> describes techniques to allow the encoding of non-ASCII
 text in various portions of a RFC 822 [2] message header, in a manner which is unlikely to confuse existing message
 handling software.
 <p>
 This class is immutable and thread-safe.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.3</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: BCodec.java 1429868 2013-01-07 16:08:05Z ggregory $</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="http://www.ietf.org/rfc/rfc1522.txt">MIME (Multipurpose Internet Mail Extensions) Part Two: Message
          Header Extensions for Non-ASCII Text</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#POSTFIX">POSTFIX</a></strong></code>
<div class="block">Prefix.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#PREFIX">PREFIX</a></strong></code>
<div class="block">Postfix.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static char</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#SEP">SEP</a></strong></code>
<div class="block">Separator.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec()">BCodec</a></strong>()</code>
<div class="block">Default constructor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec(java.nio.charset.Charset)">BCodec</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Constructor which allows for the selection of a default charset</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#BCodec(java.lang.String)">BCodec</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Constructor which allows for the selection of a default charset</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decode(java.lang.Object)">decode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</code>
<div class="block">Decodes a Base64 object into its original form.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decode(java.lang.String)">decode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Decodes a Base64 string into its original form.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#decodeText(java.lang.String)">decodeText</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)</code>
<div class="block">Applies an RFC 1522 compliant decoding scheme to the given string of text.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#doDecoding(byte[])">doDecoding</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Decodes an array of bytes using the defined encoding scheme.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding(byte[])">doEncoding</a></strong>(byte[]&nbsp;bytes)</code>
<div class="block">Encodes an array of bytes using the defined encoding scheme.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode(java.lang.Object)">encode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</code>
<div class="block">Encodes an object into its Base64 form using the default charset.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode(java.lang.String)">encode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)</code>
<div class="block">Encodes a string into its Base64 form using the default charset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode(java.lang.String,%20java.nio.charset.Charset)">encode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value,
      <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Encodes a string into its Base64 form using the specified charset.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encode(java.lang.String,%20java.lang.String)">encode</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value,
      <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charset)</code>
<div class="block">Encodes a string into its Base64 form using the specified charset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encodeText(java.lang.String,%20java.nio.charset.Charset)">encodeText</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
          <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#encodeText(java.lang.String,%20java.lang.String)">encodeText</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
          <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</code>
<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#getCharset()">getCharset</a></strong>()</code>
<div class="block">Gets the default charset name used for string decoding and encoding.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#getDefaultCharset()">getDefaultCharset</a></strong>()</code>
<div class="block">Gets the default charset name used for string decoding and encoding.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/codec/net/BCodec.html#getEncoding()">getEncoding</a></strong>()</code>
<div class="block">Returns the codec name (referred to as encoding in the RFC 1522).</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="SEP">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SEP</h4>
<pre>protected static final&nbsp;char SEP</pre>
<div class="block">Separator.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.BCodec.SEP">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="POSTFIX">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>POSTFIX</h4>
<pre>protected static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> POSTFIX</pre>
<div class="block">Prefix.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.BCodec.POSTFIX">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="PREFIX">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PREFIX</h4>
<pre>protected static final&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> PREFIX</pre>
<div class="block">Postfix.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.codec.net.BCodec.PREFIX">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="BCodec()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BCodec</h4>
<pre>public&nbsp;BCodec()</pre>
<div class="block">Default constructor.</div>
</li>
</ul>
<a name="BCodec(java.nio.charset.Charset)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BCodec</h4>
<pre>public&nbsp;BCodec(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
<div class="block">Constructor which allows for the selection of a default charset</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>charset</code> - the default string charset to use.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.7</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
</li>
</ul>
<a name="BCodec(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BCodec</h4>
<pre>public&nbsp;BCodec(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)</pre>
<div class="block">Constructor which allows for the selection of a default charset</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>charsetName</code> - the default charset to use.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/UnsupportedCharsetException.html?is-external=true" title="class or interface in java.nio.charset">UnsupportedCharsetException</a></code> - If the named charset is unavailable</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.7 throws UnsupportedCharsetException if the named charset is unavailable</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getEncoding()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncoding</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getEncoding()</pre>
<div class="block">Returns the codec name (referred to as encoding in the RFC 1522).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>name of the codec</dd></dl>
</li>
</ul>
<a name="doEncoding(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doEncoding</h4>
<pre>protected&nbsp;byte[]&nbsp;doEncoding(byte[]&nbsp;bytes)</pre>
<div class="block">Encodes an array of bytes using the defined encoding scheme.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - Data to be encoded</dd>
<dt><span class="strong">Returns:</span></dt><dd>A byte array containing the encoded data</dd></dl>
</li>
</ul>
<a name="doDecoding(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doDecoding</h4>
<pre>protected&nbsp;byte[]&nbsp;doDecoding(byte[]&nbsp;bytes)</pre>
<div class="block">Decodes an array of bytes using the defined encoding scheme.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - Data to be decoded</dd>
<dt><span class="strong">Returns:</span></dt><dd>a byte array that contains decoded data</dd></dl>
</li>
</ul>
<a name="encode(java.lang.String, java.nio.charset.Charset)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encode</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value,
            <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
              throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre>
<div class="block">Encodes a string into its Base64 form using the specified charset. Unsafe characters are escaped.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - string to convert to Base64 form</dd><dd><code>charset</code> - the charset for <code>value</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Base64 string</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.7</dd></dl>
</li>
</ul>
<a name="encode(java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encode</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value,
            <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charset)
              throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre>
<div class="block">Encodes a string into its Base64 form using the specified charset. Unsafe characters are escaped.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - string to convert to Base64 form</dd><dd><code>charset</code> - the charset for <code>value</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Base64 string</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd></dl>
</li>
</ul>
<a name="encode(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encode</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)
              throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre>
<div class="block">Encodes a string into its Base64 form using the default charset. Unsafe characters are escaped.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/StringEncoder.html#encode(java.lang.String)">encode</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - string to convert to Base64 form</dd>
<dt><span class="strong">Returns:</span></dt><dd>Base64 string</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd></dl>
</li>
</ul>
<a name="decode(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decode</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;decode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value)
              throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre>
<div class="block">Decodes a Base64 string into its original form. Escaped characters are converted back to their original
 representation.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/StringDecoder.html#decode(java.lang.String)">decode</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/codec/StringDecoder.html" title="interface in org.apache.commons.codec">StringDecoder</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - Base64 string to convert into its original form</dd>
<dt><span class="strong">Returns:</span></dt><dd>original string</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - A decoder exception is thrown if a failure condition is encountered during the decode process.</dd></dl>
</li>
</ul>
<a name="encode(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encode</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;encode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)
              throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre>
<div class="block">Encodes an object into its Base64 form using the default charset. Unsafe characters are escaped.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/Encoder.html#encode(java.lang.Object)">encode</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - object to convert to Base64 form</dd>
<dt><span class="strong">Returns:</span></dt><dd>Base64 object</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if a failure condition is encountered during the encoding process.</dd></dl>
</li>
</ul>
<a name="decode(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decode</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;decode(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)
              throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></pre>
<div class="block">Decodes a Base64 object into its original form. Escaped characters are converted back to their original
 representation.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/Decoder.html#decode(java.lang.Object)">decode</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/codec/Decoder.html" title="interface in org.apache.commons.codec">Decoder</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - Base64 object to convert into its original form</dd>
<dt><span class="strong">Returns:</span></dt><dd>original object</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - Thrown if the argument is not a <code>String</code>. Thrown if a failure condition is encountered
             during the decode process.</dd></dl>
</li>
</ul>
<a name="getCharset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCharset</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;getCharset()</pre>
<div class="block">Gets the default charset name used for string decoding and encoding.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the default charset name</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.7</dd></dl>
</li>
</ul>
<a name="getDefaultCharset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultCharset</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getDefaultCharset()</pre>
<div class="block">Gets the default charset name used for string decoding and encoding.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the default charset name</dd></dl>
</li>
</ul>
<a name="encodeText(java.lang.String, java.nio.charset.Charset)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeText</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encodeText(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
                <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)
                     throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></pre>
<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.
 <p>
 This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes
 <a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding(byte[])"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific encoding.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - a string to encode</dd><dd><code>charset</code> - a charset to be used</dd>
<dt><span class="strong">Returns:</span></dt><dd>RFC 1522 compliant "encoded-word"</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
</li>
</ul>
<a name="encodeText(java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeText</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;encodeText(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
                <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;charsetName)
                     throws <a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a>,
                            <a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre>
<div class="block">Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset.
 <p>
 This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes
 <a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding(byte[])"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific encoding.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - a string to encode</dd><dd><code>charsetName</code> - the charset to use</dd>
<dt><span class="strong">Returns:</span></dt><dd>RFC 1522 compliant "encoded-word"</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</a></code> - thrown if there is an error condition during the Encoding process.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if charset is not available</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a></dd></dl>
</li>
</ul>
<a name="decodeText(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>decodeText</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;decodeText(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)
                     throws <a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a>,
                            <a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre>
<div class="block">Applies an RFC 1522 compliant decoding scheme to the given string of text.
 <p>
 This method processes the "encoded-word" header common to all the RFC 1522 codecs and then invokes
 <a href="../../../../../org/apache/commons/codec/net/BCodec.html#doEncoding(byte[])"><code>doEncoding(byte [])</code></a> method of a concrete class to perform the specific decoding.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - a string to decode</dd>
<dt><span class="strong">Returns:</span></dt><dd>A new decoded String or <code>null</code> if the input is <code>null</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</a></code> - thrown if there is an error condition during the decoding process.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - thrown if charset specified in the "encoded-word" header is not supported</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/BCodec.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/apache/commons/codec/net/QCodec.html" title="class in org.apache.commons.codec.net"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/codec/net/BCodec.html" target="_top">Frames</a></li>
<li><a href="BCodec.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
